<%--
  Created by IntelliJ IDEA.
  User: wenze-zero
  Date: 2021-06-10-010
  Time: 上午 09:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.ArrayList" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
在线：<br>
<%
    String login=(String)session.getAttribute ("loginname" );
    if(login==null){
        response.sendRedirect ( "text401.jsp" ) ;}
    out.print(login+"<br>");
%>
登录成功：<br>
<%
    ArrayList users=(ArrayList) application.getAttribute("username");
    for(int i=1;i<= users.size();i++)
    {
        String user=(String)users.get(i-1);
        out.print("第"+i+"位用户名为："+user+"<br>");
    }
%>
</body>

</html>
